﻿using Microsoft.Extensions.Caching.Distributed;
using System;

namespace CoreCms.Net.Caching.Configuration
{
    public class CoreCmsDistributedCacheOptions
    {
        internal static string CoreCmsDistributedCache = "DistributedCache";

        public CoreCmsDistributedCacheOptions()
        {
            KeyPrefix = "";
            GlobalCacheEntryOptions = new DistributedCacheEntryOptions()
            {
                SlidingExpiration = TimeSpan.FromMinutes(20)
            };
            Redis = new RedisOptions();
        }

        public string KeyPrefix { get; set; }

        public RedisOptions Redis { get; set; }
        public DistributedCacheEntryOptions GlobalCacheEntryOptions { get; set; }
    }
}